/*
 *    私表管理
 * Author: lengleng (wangiegie@gmail.com)
 */

import request from '@/router/axios'

// 获取列表
export function fetchList(query) {
  return request({
    url: '/meter/mrprivatemeterwriterecord/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/estate/rmproject',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/estate/rmproject/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/estate/rmproject/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/estate/rmproject',
    method: 'put',
    data: obj
  })
}

// 获取记录详情
export function getRecordDetails(obj) {
  return request({
    url: '/meter/mrprivatemeterwriterecord/queryAddRecordInfo',
    method: 'get',
    params: obj
  })
}

// 保存
export function saveRecordDetails(obj) {
  return request({
    url: '/meter/mrprivatemeterwriterecord/saveRecordDetails',
    method: 'post',
    data: obj
  })
}

// 查看抄表记录
export function getById(obj) {
  return request({
    url: '/meter/mrprivatemeterwriterecord/getRecordDetails',
    method: 'get',
    params: obj
  })
}

// 查看编辑保存
export function viewSave(obj) {
  return request({
    url: '/meter/mrprivatemeterwriterecord',
    method: 'put',
    data: obj
  })
}

// 文件导入
export function ImportFile(obj) {
  return request({
    url: "/meter/mrprivatemeterwriterecord/inputPrivateMeter",
    method: 'post',
    data: obj
  })
}
